home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / s-wchstw.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  51 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                       S Y S T E M . W C H _ S T W                        --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.4 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- The GNAT library is free software; you can redistribute it and/or modify --
  14. -- it under terms of the GNU Library General Public License as published by --
  15. -- the Free Software  Foundation; either version 2, or (at your option) any --
  16. -- later version.  The GNAT library is distributed in the hope that it will --
  17. -- be useful, but WITHOUT ANY WARRANTY;  without even  the implied warranty --
  18. -- of MERCHANTABILITY  or  FITNESS FOR  A PARTICULAR PURPOSE.  See the  GNU --
  19. -- Library  General  Public  License for  more  details.  You  should  have --
  20. -- received  a copy of the GNU  Library  General Public License  along with --
  21. -- the GNAT library;  see the file  COPYING.LIB.  If not, write to the Free --
  22. -- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.        --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. --  This package contains the routine used to convert strings to wide
  27. --  strings for use by wide character attributes (value, image etc.)
  28.  
  29. with System.WCh_Con;
  30.  
  31. package System.WCh_StW is
  32. pragma Pure (WCh_StW);
  33.  
  34.    function String_To_Wide_String
  35.      (S    : String;
  36.       EM   : System.WCh_Con.WC_Encoding_Method)
  37.       return Wide_String;
  38.    --  This routine simply takes its argument and converts it to wide string
  39.    --  format. In the context of the Wide_Image attribute, the argument is
  40.    --  the corresponding 'Image attribute. Any wide character escape sequences
  41.    --  in the string are converted to the corresponding wide character value.
  42.    --  No syntax checks are made, it is assumed that any such sequences are
  43.    --  validly formed (this must be assured by the caller, and results from
  44.    --  the fact that Wide_Image is only used on strings that have been built
  45.    --  by the compiler, such as images of enumeration literals. If the method
  46.    --  for encoding is a shift-in, shift-out convention, then it is assumed
  47.    --  that normal (non-wide character) mode holds at the start and end of
  48.    --  the argument string. EM indicates the wide character encoding method.
  49.  
  50. end System.WCh_StW;
  51.